package com.kk.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kk.mapper.SysUserRoleMapper;
import com.kk.pojo.entity.SysRole;
import com.kk.pojo.entity.SysUserRole;
import com.kk.service.SysUserRoleService;
import org.springframework.stereotype.Service;

import javax.management.relation.Role;
import java.math.BigInteger;
import java.util.List;

/**
 * @author kl
 * @version 1.0
 * @description: TODO
 * @date 2025/10/13 下午5:53
 */
@Service
public class SysUserRoleServiceImpl  extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {

    @Override
    public List<SysUserRole> selectRoleByUserId(BigInteger userId) {
        LambdaQueryWrapper<SysUserRole> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SysUserRole::getUserId, userId);
        return this.list(queryWrapper);
    }
}
